const { resolve } = require('path')
const ENVCONF = {
  // 测试
  development: {
    baseUrl: 'http://koa.wangyouchat.com',
    dbName: 'airplane_dev',
    // CREATE DATABASE IF NOT EXISTS airplane_dev DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    PORT: 3008
  },
  // 正式
  production: {
    baseUrl: 'http://api.wangyouchat.com',
    PORT: 3009,
    // CREATE DATABASE IF NOT EXISTS airplane_pro DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    dbName: 'airplane_pro',
  }, 
  // 线上第一套
  production1: {
    baseUrl: 'http://api.ssdchat.com',
    PORT: 3010,
    // CREATE DATABASE IF NOT EXISTS airplane20191207 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    dbName: 'airplane20191207',
  }
}
module.exports = {
  'db': {
    name: ENVCONF[process.env.NODE_ENV].dbName,
    user: 'root',
    password: '@flan_m4ys23ql_yhao_010'
  },
  'server': {
    HOST: 'localhost',
    PORT: ENVCONF[process.env.NODE_ENV].PORT,
    apiPreFix: '/api/v0',
    fileSavePath: resolve(__dirname, '../', 'resources/upload'),
    SIGN_KEY: 'gameSource'
  },
  'game': {
    // 测试环境
    baseUrl: ENVCONF[process.env.NODE_ENV].baseUrl,
    // 正式环境
    duration: 60, // 对战时长
    checkCode: 'gameSource'
  }
}